import { postAction } from '@/api/manage'
export function actionToObject(json) {
  try {
    return JSON.parse(json)
  } catch (e) {
    console.log('err', e.message)
  }
  return []
}
export function reflashSystemMenu() {
  window.sessionStorage.removeItem('asyncTrees')
  postAction('/hteSystemMenu/tree', {}).then(res=>{
    if (res.success) {
      window.sessionStorage.setItem('asyncTrees',JSON.stringify(res.result))
    }
  })
}